package jude.java.money.batch.bean;

import java.util.Date;

import jude.java.util.DateUtils;

public class Domain {

	private String name;		//代理商
	private String provider;
	private Date expireDate;	//过期时间
	private String pass;
	private String remark;
	
	public Domain() {
	}
	public Domain(String name, String provider, String expire, String pass) {
		this(name, provider, expire, pass, null);
	}
	public Domain(String name, String provider, String expire, String pass, String remark) {
		this.name = name;
		this.provider = provider;
		this.expireDate = DateUtils.toDate(expire, DateUtils.DEFAULT_DATE_FORMAT);
		this.pass = pass;
		this.remark = remark;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getProvider() {
		return provider;
	}
	public void setProvider(String provider) {
		this.provider = provider;
	}
	public Date getExpireDate() {
		return expireDate;
	}
	public void setExpireDate(Date expireDate) {
		this.expireDate = expireDate;
	}
	public String getPass() {
		return pass;
	}
	public void setPass(String pass) {
		this.pass = pass;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public boolean isExpired() {
		return expireDate != null && System.currentTimeMillis() > expireDate.getTime();
	}
}
